
Vehicle_RedBase is a platform for making advanced vehicles.
The goal is to make it easy to implement common vehicle features with minimal code
- To provide consistent and bug-free behavior for advanced vehicles
- To make making advanced vehicles as straightforward as possible
- To raise the standard of vehicle add-ons

RedBase allows you to set several datablock fields on vehicles, bots, weapons, and projectiles.
These fields are handled by the RedBase code to automatically provide the desired behavior, requiring little to no programming on the part of vehicle makers.
Features include:
	- Turrets - Just set the turret fields on the vehicle datablock, and RedBase does the rest. No more fiddling with the default tank code, detecting vehicle spawns or recolors, renaming variables, etc - just set 5 variables and you're done. Works on vehicles and bots, so you can have turrets on your turrets!
	- Mounted guns - Just set the gun fields, and you can either have a mounted weapon image, or a default-tank-style script-based gun, fireable from any seat, with callbacks for firing and reloading. Say goodbye to copy-pasting the default tank code and remaing all the variables, you can have working guns on any vehicle in seconds. Works on vehicles and bots.
	- Armor - Allows vehicles to be immune to smaller weapons, perfect for tanks. Projectiles with damage (directDamage + radiusDamage) below the armor value bounce off the vehicle. Works on vehicles and bots, good for tank turrets (or boss fights?)
	- Easy height control, without client mods, using MoveHandler.dll on the server only. Workarounds are planned for when you don't have the DLL installed, including backwards compatibility with the old height control mod.
	- Speed-based sounds and animations - Just set the speed cutoff fields and the speed state animation fields, and you can have sounds or animations automatically play when someone is in the vehicle or when the vehicle is at certain speeds. Also provides callbacks so you can easily write your own speed-based code, without messy loops or detecting spawning etc.
	- Wheel-specific tires and springs - Set the tire and spring per-wheel on any vehicle with datablock fields. Should have been in the base game.
	- Explode-on-impact - Just set two variables and any vehicle can crash and explode. No more bugs like vehicles respawning instantly.
	- Seat-specific player datablocks - Lets you force a player to be a specific datablock when they're in a certain seat, and handles resetting the datablock and changing datablocks while seated without issues. Works on vehicles and bots.
	- Proximity fuses - Make any projectile explode on proximity to target with a few simple datablock fields.
	- Gravity vehicles - Make any vehicle stick to walls with one line of code, without falling up into infinity like the old gravity jeep. You can also make vehicles jump, in case you wanted to do that for some reason.
	- Functionality and performance - All features are implemented once, in the most feature-complete and bug-free way, meaning YOU don't have to write or modify a single line of code. No more mixing and mashing code from ancient add-ons, rolling your own but forgetting an edge case, renaming hundreds of variables in the garbled mess you have created and spending hours trying to get it to work right. Making vehicles with perfect feel and usability now takes almost no effort. So go make something!

----

Vehicle fields:
	
	heliUpForce                - Force to apply when the driver is pressing jump
	heliDownForce              - Force to apply when the driver is pressing crouch
	
	jumpImpulse                - Impulse to apply when the driver hits jump and the vehicle is on the ground
	isGravityVehicle           - Whether the vehicle sticks to walls like the gravity jeep
	
	numTurrets                 - Number of mounted bot turrets
	turretSlot[x]              - Which seat to mount the turret in
	turretDatablock[x]         - What bot datablock is the turret
	
	numGuns                    - Number of image-based fixed mounted guns
	gunOperatorSlot[x]         - From which seat is the gun controlled
	gunTrigger[x]              - What trigger does the operator use to fire the gun (LMB = 0, Jet = 1, Jump = 2, Crouch = 3)
	gunImage[x]                - What weapon image is the gun
	gunSlot[x]                 - Which seat is the gun mounted in
	
	numFixedGuns               - Number of script-based guns
	fixedGunOperatorSlot[x]    - Seat from which the gun is controlled
	fixedGunTrigger[x]         - Trigger number the operator uses to fire the gun (i.e. 0 for LMB)
	fixedGunSlot[x]            - Slot that acts as the muzzle of the gun
	fixedGunForwardOffset[x]   - Distance along the firing direction to offset the muzzle point
	fixedGunShotTimeMs[x]      - Time between shots
	fixedGunIsAutomatic[x]     - Whether to fire continuously if the trigger is held
	fixedGunProjectile[x]      - Projectile to spawn on fire
	fixedGunRecoilImpuse[x]    - Recoil impulse to apply to parent vehicle on fire
	fixedGunFireSound[x]       - Sound to play on fire
	fixedGunFireAnimation[x]   - Animation to play when firing (plays on thread 0)
	fixedGunReadySound[x]      - Sound to play when ready to fire again
	fixedGunReadyAnimation[x]  - Animation to play when ready to fire again (plays on thread 0)
	fixedGunEmitterImage[x]    - Image to mount on fire
	fixedGunEmitterTimeMs[x]   - Time after which emitter image is removed - can be longer than time between shots
	fixedGunFireCallback[x]    - Function to call on the datablock when gun is fired, i.e. "onGunFire" would call YourTankVehicle::onGunFire(%datablock, %vehicle, %gunSlot) where gunSlot is x
	fixedGunReadyCallback[x]   - Function to call on the datablock when the gun is ready to fire again, i.e. "onGunReady" would call YourTankVehicle::onGunReady(%datablock, %vehicle, %gunSlot) where gunSlot is x
	
	armorMinimumDamage         - Minimum damage to penetrate armor, below which the projectile bounces off
	
	numWheels                  - Default property: number of wheels
	wheelTire[x]               - Tire specific to this wheel - if empty, uses .defaultTire
	wheelSpring[x]             - Spring specific to this wheel - if empty, uses .defaultSpring
	wheelSteering[x]           - Steering rate of wheel: -1 to 1
	
	slotDisableTools[x]        - Whether to prevent players from equipping tools when sitting in this seat
	slotPlayerDatablock[x]     - Datablock to change players to when they enter a slot, reverts when they leave
	
	impactExplosionSpeed       - Minimum speed of impact to destroy
	impactExplosionProjectile  - Explosion to use if destroyed by impact
	
	slowSpeed                  - Speed at which onSlow will be called when going above, or onIdle when going below (required for speed callbacks)
	fastSpeed                  - Speed at which onFast will be called when going above, or onSlow when going below (optional)
	veryFastSpeed              - Speed at which onVeryFast will be called when going above, or onFast when going below (optional)
	gLimit                     - Gs in TU/s^2 at which onHighG will be called when going above, or onLowG when going below
	
	stateSound[x]              - x is one of: Off, Idle, Slow, Fast, VeryFast (Speed-based sounds play on sound thread 0)
	stateAnimation[x]          - Animation to play when in this speed range (Speed-based animations play on animation thread 0)
	stateUpSound[x]            - Sound to play when coming into this speed from a lower speed
	stateUpSoundTimeMs[x]      - Time to play stateUpSound before transitioning to stateSound
	stateUpAnimation[x]        - Animation to play when coming into this speed range from a lower speed
	stateUpAnimationTimeMs[x]  - Time to play stateUpAnimation before transitioning into stateAnimation
	stateDownSound[x]          - Sound to play when coming into this speed range from a higher speed
	stateDownSoundTimeMs[x]    - Time to play stateDownSound before transitioning to stateSound
	stateDownAnimation[x]      - Animation to play when coming into this speed range from a higher speed
	stateDownAnimationTimeMs[x]- Time to play stateDownAnimation before transitioning to stateAnimation
	stateImage[x]              - Image to mount when in this state, i.e. emitters
	stateImageSlot[x]          - Slot to mount stateImage in
	
	highGSound                 - Sound to play when experiencing Gs over gLimit (G-based sounds play on sound thread 1)
	highGAnimation             - Animation to play on high Gs (G-based animations play on animation thread 1)
	highGStartSound            - Sound to play at first, transitioning to highGSound after highGStartSoundTime has passed
	highGStartSoundTimeMs      - Time in ms before transitioning from highGStartSound to highGSound
	highGStartAnimation        - Animation to play at first
	highGStartAnimationTimeMs  - Time to transition to highGAnimation
	highGStopSound             - Sound to play on transition from high Gs to low
	highGStopSoundTimeMs       - Time to play highGStopSound
	highGStopAnimation         - Animation to play on transition from high Gs to low
	highGStopAnimationTimeMs   - Time to play highGStopAnimation


Vehicle callbacks:
	onOff                      - When the vehicle is first spawned, or when the last person leaves the vehicle, or when no one is in the vehicle and speed goes below slowSpeed
	onIdle                     - When speed goes below slowSpeed, or the first person enters the vehicle
	onSlow                     - When speed goes above slowSpeed, or below fastSpeed
	onFast                     - When speed goes above fastSpeed or below veryFastSpeed
	onVeryFast                 - When speed goes above veryFastSpeed
	onHighG                    - When G force exceeds gLimit
	onLowG                     - When G force goes back below gLimit


Bot fields:
	
	armorMinimumDamage - see vehicle
	
	numTurrets and turret fields - see vehicle
	numGuns and gun fields - see vehicle
	numFixedGuns and fixed gun fields - see vehicle
	
	slotPlayerDatablock[x] - see vehicle
	slotDisableTools[x] - see vehicle
	
	deathExplosionProjectile   - Projectile that spawns when the bot dies, instead of the death animation
	
	animLookLimitUp            - Upper look limit of animations (0 is all the way up, 1 is all the way down; this should be the lower of the two values)
	animLookLimitDown          - Lower look limit of animations (0 is all the way up, 1 is all the way down; this should be the higher of the two values)


Weapon image fields:
	recoilImpulse              - Impulse applied to vehicles that fire it

Projectile fields:
	proximityFuseDistance      - Maximum distance to target for detonation (Projectile explodes as close as possible to target, provided it is within range)
	proximityFuseArmingDelayMs - Time after firing before proximity fuse is armed

----

Planned features:
- Backwards compatibility with old height control, if the server doesn't have MoveHandler.dll
